package cn.memorynine.consumer.controller;

import cn.memorynine.consumer.model.order.manage.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import cn.memorynine.common.model.ResponseWrapper;
import cn.memorynine.consumer.service.OrderManageService;
import cn.memorynine.common.model.ResponseWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestBody;

/**
* 管理后台-订单管理控制器
* @author 代码生成器
*/
@Slf4j
@RestController
@RequestMapping("/admin/OrderManage")
public class OrderManageController {
    @Autowired
    private OrderManageService OrderManageService;

    /**
     * 1.查看所有订单
     * @return
     */
    @RequestMapping("/orderList")
    public ResponseWrapper orderList(@RequestBody @Validated OrderListParam param){
        return OrderManageService.orderList(param);
    }

    /**
     * 2.查看订单详情
     * @return
     */
    @RequestMapping("/orderInfo")
    public ResponseWrapper orderInfo(@RequestBody @Validated OrderInfoParam param){
        return OrderManageService.orderInfo(param);
    }

    /**
     * 3.订单发货
     * @return
     */
    @RequestMapping("/orderDeliver")
    public ResponseWrapper orderDeliver(@RequestBody @Validated OrderDeliverParam param){
        return OrderManageService.orderDeliver(param);
    }

}